﻿using Elsa.Workflows.Management.Entities;
using T.FAS.Runtime.MF.Common;
using Elsa.Workflows.Runtime.Messages;
using T.FAS.Runtime.MF.Entity;
namespace T.FAS.Runtime.MF.SGSPI
{
    public interface IEngineService
    {
        /// <summary>
        /// 执行工作流
        /// </summary>
        /// <param name="param"></param>
        SGResult<ElsaExecutionResult> ExecuteWorkflow(WorkflowExecuteParam param);
        /// <summary>
        /// 直接发起新流程，不等待结果
        /// </summary>
        /// <param name="param"></param>
        SGResult<RunWorkflowInstanceResponse> StartWorkflow(WorkflowExecuteParam param);
        /// <summary>
        /// 发布工作流
        /// </summary>
        /// <param name="defJson"></param>
        SGResult<List<WorkflowDefinition>> PublishWorkflow(string defJson);
        /// <summary>
        /// 获取工作执行详细信息
        /// </summary>
        /// <param name="defJson"></param>
        SGResult<List<WorkflowInstanceDetail>> GetExecuteDetail(string instanceId);
        /// <summary>
        /// 调试工作流
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        SGResult<ElsaExecutionResult> DebugWorkflow(WorkflowDebugParam param);

    }
}
